package com.littlepay.kr4.paulin.dfeba77.adapter;

import com.littlepay.kr4.paulin.dfeba77.application.MyApplication;
import com.littlepay.kr4.paulin.dfeba77.config.SqliteConfig;
import com.littlepay.kr4.paulin.dfeba77.entity.Sticker;
import com.littlepay.kr4.paulin.dfeba77.utils.DateUtil;
import com.littlepay.kr4.paulin.dfeba77.utils.SqliteHelper;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by 77dfeba on 2017/6/12.
 * 用于获取PieChart的数据
 */

public class PieChartAdapter {
    public List<Sticker> getCurrentMonthCostDetail(){
        List<Sticker> currentMonthCostDetailList = new ArrayList<>();
        SqliteHelper sqliteHelper = new SqliteHelper(MyApplication.getInstance().getContext(), SqliteConfig.SQLITE_DATABASE_FILE_NAME, null, 1);
        currentMonthCostDetailList = sqliteHelper.queryDataListByMonth(DateUtil.getTodayDate().substring(0,8));
        return currentMonthCostDetailList;
    }
}
